﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Web;
using BusinessLayer;

namespace ServiceLayer
{
    [DataContract]
    public class PolygonDTO
    {
        [DataMember]
        public List<PointDTO> Points { set; get; }

        internal PolygonDTO(BusinessLayer.Polygon polygon)
        {
            Points = new List<PointDTO>();
            foreach (Point point in polygon.Points)
                Points.Add(new PointDTO(point));
        }
    }
}